home *** CD-ROM | disk | FTP | other *** search
- Path: frco.com!usenet
- From: Jadam@tcmail.frco.com (Jim Adam)
- Newsgroups: comp.lang.c++
- Subject: Re: NEWBIE:strings, spacing, white_spacing
- Date: 5 Feb 1996 18:52:52 GMT
- Organization: Fisher Rosemount Systems
- Message-ID: <4f5jm4$e5p@rolaids.frco.com>
- References: <3111CD7E.2A81@dg.com> <4esavf$sqb@cloner4.netcom.com>
- NNTP-Posting-Host: primrose.frco.com
- Mime-Version: 1.0
- X-Newsreader: WinVN 0.93.11
-
- In article <4esavf$sqb@cloner4.netcom.com>, froman@ix.netcom.co says...
-
-
- > I am reading a string (actually many) heres a sample,
- >
- >The purpose in the real program is to read addresses (the ones on
- >letters), and I want to read the address lines in one by one.
- >
- >When a string is inputed such as 12651 West Alabama Apt 203
- >I only receive, as output, 12651
- >I am using Borland 4.5
-
- In Borland, you can use the C++ STL string class to read an
- entire line. Can't remember the exact name of that function,
- but it's something like:
-
- string s;
- s.readline( cin );
- ^^^^^
-
- Again, I'm not sure exactly what the name of that function
- is, but it's something similar to that.
-
- This should get all of "12651 West Alabama...." so long as
- it appears on one line. Also, as the C++ string class can
- dynamically resize itself, you have no worries on that front.
-
- Hope this helps,
-
- Jim
- Jadam@tcmail.frco.com
-
-